package filecloud;

import java.util.Comparator;

public class FreeSpaceComparator implements Comparator<CloudFile> {

	@Override
	public int compare(CloudFile object1, CloudFile object2) {
		if(object1 == null){
			return 1;
		}
		if(object2 == null){
			return -1;
		}
		
		return -1*(new Long(object1.getCachedFreeSpace()).compareTo(new Long(object2.getCachedFreeSpace())));
	}

}
